<template>
  <div>
    <!--<el-header height="30%">-->
    <!--</el-header>-->
    <el-tabs :stretch="false" v-model="activeName">
      <el-tab-pane label="班次" name="empcls">
        <manage-panel
          ref="managePanel"
          :fatherMethodShowSub="funShowSub"
          :tableHeight="'200px'"
        ></manage-panel>
      </el-tab-pane>

     <!--  <el-tab-pane style="margin-right: 10px" label="员工" name="emp"> 

        <employee-multi-select ref='employeeSelect'
          v-model="page.query.param.employeeId"
          :confirmFind="confirmFind"
          :cancelFind="cancelFind"
        >
        </employee-multi-select>
      </el-tab-pane> -->
    </el-tabs>
    <!--<el-main width="60%">-->
    <!--<el-tabs   :stretch="false" v-model="activeName">-->
    <!--<el-tab-pane label="员工名单" name="emp">-->

    <!--</el-tab-pane>-->

    <!--<el-tab-pane style="margin-right: 10px" label="员工班次" name="empcls">-->
    <!--<manage-panel-sub ref="managePanelSub"></manage-panel-sub>-->

    <!--</el-tab-pane>-->
    <!--</el-tabs>-->
    <!--</el-main>-->
  </div>
</template>
<script>
import ManagePanel from "./Manage";
import ManagePanelSub from "./ManageSub";
import EmployeeMultiSelect from "@/components/widgets/hr/EmployeeMultiSelect.vue";

export default {
  components: { EmployeeMultiSelect, ManagePanel, ManagePanelSub },
  data() {
    return {
      page: {
        query: {
          param: {
            employeeId: null,
          },
        },
      },
      activeName: "empcls",
      collapse: false,
      parentId: -1,
    };
  },

  methods: {
    findEmployee() {
      //   this.$refs.formFindDiag.show();
    },

    confirmFind(row) {
      // this.$refs.formFindDiag.hide();
      this.page.query.param.employeeId = row.id;
      this.page.query.param.departmentId = null;

      //this.search();
    },
    cancelFind() {
      // this.$refs.formFindDiag.hide();
    },

    tabClick(tab) {},
    funShowSub(row) {
      this.parentId = row.classMasterId;
      console.log("show sub");

      this.$refs.managePanelSub.init({
        parent: row,
        parentId: row.classMasterId,
      });
    },
  },

  mounted() {
    this.$refs.managePanel.init({ parentId: 0 });
    // this.$refs.managePanelSub.init({parentId: -1});
  },
};
</script>
